import request from '@/utils/request'

// 查询商品资源列表
export function listProductRes(query) {
  return request({
    url: '/supermarket/productRes/list',
    method: 'get',
    params: query
  })
}

// 查询商品资源详细
export function getProductRes(id) {
  return request({
    url: '/supermarket/productRes/' + id,
    method: 'get'
  })
}

// 新增商品资源
export function addProductRes(data) {
  return request({
    url: '/supermarket/productRes',
    method: 'post',
    data: data
  })
}

// 修改商品资源
export function updateProductRes(data) {
  return request({
    url: '/supermarket/productRes',
    method: 'put',
    data: data
  })
}

// 提交商品资源
export function commitProductRes(data) {
  return request({
    url: '/supermarket/productRes/commit',
    method: 'post',
    data: data
  })
}

// 审核商品资源
export function auditProductRes(data) {
  return request({
    url: '/supermarket/productRes/audit',
    method: 'post',
    data: data
  })
}

// 删除商品资源
export function delProductRes(id) {
  return request({
    url: '/supermarket/productRes/' + id,
    method: 'delete'
  })
}

// 查询商品资源列表
export function queryProductRes(query) {
  return request({
    url: '/supermarket/productRes/query',
    method: 'get',
    params: query
  })
}
